package com.zhijian.warehouse.manage.entity.dto.stock;


import com.zhijian.warehouse.manage.enums.StockActionEnum;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Tolerate;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@Builder
public class StockActionDto {

    
    private Long optId;
    
    /**
     * 库存变更类型
     * {@link StockActionEnum}
     */
    @NotNull
    private StockActionEnum.ACTION_TYPE actionType;
    
    /**
     * 商品详情
     */
    @NotEmpty
    private List<StockStorageDto> stockStorages;
    
    /**
     * 单据编码
     */
    @NotNull
    private String voucherCode;

    
    /**
     * 单据时间
     */
    @NotNull
    private String voucherTime;

    /**
     * 操作人id(审核通过人)
     */
    private Long optUserId;

    /**
     * 制单人id
     */
    private Long crtUserId;

    /**
     * 操作来源 1=web 2=app
     */
    private Integer optSource;
    
    @Tolerate
    public StockActionDto() {
    }
}
